|
|
|
|
|
|
|
ByVal uid As String, ByVal uidlen As Integer, ByVal pwd As String, _
ByVal pwdlen As Integer) As Integer
Declare Function SQLFreeConnect Lib "odbc32.dll" (ByVal hDbc As Long) _
As Integer
Declare Function SQLDisconnect Lib "odbc32.dll" (ByVal hDbc As Long) _
As Integer
Declare Function SQLAllocStmt Lib "odbc32.dll" (ByVal hDbc As Long, _
hStmt As Long) As Integer
Declare Function SQLFreeStmt Lib "odbc32.dll" (ByVal hStmt As Long, _
ByVal EndOption As Integer) As Integer
Declare Function SQLExecDirect Lib "odbc32.dll" (ByVal hStmt As Long, _
ByVal sqlString As String, ByVal sqlstrlen As Long) As Integer
Declare Function SQLNumResultCols Lib "odbc32.dll" (ByVal hStmt As Long, _
NumCols As Integer) As Integer
Declare Function SQLFetch Lib "odbc32.dll" (ByVal hStmt As Long) As Integer
Declare Function SQLGetData Lib "odbc32.dll" (ByVal hStmt As Long, _
ByVal Col As Integer, ByVal wConvType As Integer, ByVal lpbBuf As String, _
ByVal dwbuflen As Long, lpcbout As Long) As Integer
Declare Function sqlError Lib "odbc32.dll" Alias "SQLError" (ByVal env As _
Long, ByVal hDbc As Long, ByVal hStmt As Long, ByVal SQLState As _
String, NativeError As Long, ByVal Buffer As String, ByVal Buflen As _
Integer, OutLen As Integer) As Integer
Declare Function SQLSetConnectOption Lib "odbc32.dll" (ByVal hDbc&, _
ByVal fOption%, ByVal vParam&) As Integer
Declare Function SQLSetStmtOption Lib "odbc32.dll" (ByVal hStmt&, _
ByVal fOption%, ByVal vParam&) As Integer |
|
|
|
|
|
|
|
|
Listing 19.1 contains the ODBC API calls needed to implement basic connect, data-transfer, and disconnect operations. Now add the constants in Listing 19.2 to the module. |
|
|
|
|
|
|
|
|
Listing 19.2. The ODBC constant declarations. |
|
|
|
|
|
|
|
|
'
' misc constants
Public Const sqlChar = 1
Public Const sqlMaxMsgLen = 512
Public Const sqlFetchNext = 1
Public Const sqlFetchFirst = 2
Public Const sqlStillExecuting = 2
Public Const sqlODBCCursors = 110
Public Const sqlConcurrency = 7
Public Const sqlCursorType = 6 |
|
|
|
|
|